<?php

namespace app\api\controller\server;



use think\Cache;
use think\Db;

class Server
{

    private static $obj;

    public static function getInstance()
    {
        return empty(self::$obj) ? (self::$obj = new self()) : self::$obj;
    }

    /**
     * @param array $where
     * @return bool|mixed|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     * 获取区域数据
     */
    public function getAreaList($where = []){
//        return  Cache::remember('getAreaList', function () use ($where){
           return  Db::name('area')->field('id,pid,name')->where($where)->select();
//        },3600);

    }
}
